package com.gperp.controller;

import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gperp.common.StringUtils;
import com.gperp.service.LogsService;

@Controller
public class LogsController {
	
	@Resource
	private LogsService logsService;
	
	@RequestMapping(value="logsList",method=RequestMethod.GET)
	@CrossOrigin
	@ResponseBody
	public Map<String,Object> logsList(@RequestParam(defaultValue="1")Integer pageNo,String usercode,HttpServletRequest request){
		return logsService.queryList(pageNo,StringUtils.getGetString(usercode));
	}
}
